package com.example.javabasic.suanfa.jiandan.反转链表;

public class Linked {
    public Integer val;
    public Linked next;
    public Linked(){}
    public Linked(Integer val){
        this.val  = val;
    }



    public String toString(){
        StringBuffer buffer = new StringBuffer();
        Linked now = this;
        while(now!=null){
            buffer.append(now.val);
            buffer.append(",");
            now = now.next;
        }
        return buffer.toString();
    }
}
